package handler;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2020-01-10 11:35
 * @notify
 * @version 1.0
 */

import mapping.Configuration;
import mapping.MappedStatement;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

public interface StatementHandler<E> {
    Statement prepare(Connection connection,String sql) throws Exception;

    void setParam(Configuration configuration, Statement statement, MappedStatement mappedStatement, Object param) throws Exception;

    E query(Configuration configuration, MappedStatement mappedStatement, Statement statement) throws Exception;

    boolean insert( Statement statement)throws Exception;
}
